package schema.ext;

public enum HttpMethod {
	GET, POST, HEAD, OPTIONS, PUT, DELETE, TRACE;

	public static HttpMethod getByString(String value) {
		if (value.equalsIgnoreCase("get")) {
			return GET;
		} else if (value.equalsIgnoreCase("post")) {
			return POST;
		} else if (value.equalsIgnoreCase("HEAD")) {
			return HEAD;
		} else if (value.equalsIgnoreCase("OPTIONS")) {
			return OPTIONS;
		} else if (value.equalsIgnoreCase("PUT")) {
			return PUT;
		} else if (value.equalsIgnoreCase("DELETE")) {
			return DELETE;
		} else if (value.equalsIgnoreCase("TRACE")) {
			return TRACE;
		}
		return null;
	}

}
